package com.ls.service.impl;

import com.ls.dao.LevelDao;
import com.ls.entity.JsonResult;
import com.ls.entity.Level;
import com.ls.service.ILevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("levelService")
public class LevelServiceImpl implements ILevelService {
	@Autowired
	private LevelDao dao;
	public JsonResult<List<Level>> findLevel() {
		JsonResult<List<Level>> result = new JsonResult<List<Level>>();
		List<Level> list = dao.findLevel();
		if (list != null) {
			result.setStatus(0);
			result.setData(list);
			return result;
		}
		result.setStatus(1);
		result.setMsg("查询类level失败");
		return result;
	}

}
